<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib  prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %> 
<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html lang="zh-CN">
  <head>
    <base href="<%=basePath%>">
    
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <title>工艺指令</title>
 
  </head>
  
  <body class="client-body">
    
  		<jsp:include page="../common/client-head.jsp"></jsp:include>
  		<script type="text/javascript" src="resources/js/system/carDesign/craftOrder.js"></script>
  		 
  		<div class="client-content">
	  		<div class="co-head">
  				<div class="co-headTop">
  					<div class="co-headCol co-headTitle">总装工艺</div>
  					<div class="co-headCol">
						<div class="co-carType">型号：<span>${carInstructionsModel.cartype}</span></div>
						<div class="co-carName">${carInstructionsModel.alias}</div>
					</div>
  				</div>
  				<div class="co-headCount">共${fn:length(carInstructionsModel.valueList)}道工艺</div>
  				
	  			<div class="co-headAction">
	  				<a class="co-headOption" href="javascript:exportPDF(${carInstructionsModel.designid});">
		  				<div class="co-headImg"><img src="resources/images/download.png"/></div>
		  				<div>下载</div>
	  				</a>
	  				<a class="co-headOption" href="javascript:saveEditInstructions(0);">
		  				<div class="co-headImg"><img src="resources/images/save.png"/></div>
		  				<div>保存</div>
	  				</a>
	  				<a class="co-headOption" href="javascript:saveEditInstructions(1);">
		  				<div class="co-headImg"><img src="resources/images/save-back.png"/></div>
		  				<div>保存并返回</div>
	  				</a>
	  			</div>
	  		</div>
	  		
	  		<div class="co-content">
	  			<div class="co-contentAction right clearfix">
	  				<a id="co-listAdd" href="javascript:;"><i class="fa fa-plus-square-o"></i></a>
	  				<a id="co-listEdit" href="javascript:;"><i class="fa fa-edit"></i></a>
	  				<a id="co-listDel" href="javascript:;"><i class="fa fa-trash-o"></i></a>
	  				<a href="javascript:location.reload();"><i class="fa fa-refresh"></i></a>
	  			</div>
	  			 
	  			<div class="co-contentList" id="container">
		  			<form action="">
		  				<table class="table table-bordered table-hover">
					      <thead>
					        <tr>
					          <th  style="width: 10%;">工序</th>
					          <th>工序内容</th>
					          <th style="width: 5%;"></th>
					        </tr>
					      </thead>
					      <tbody id="co-listBody">
					      
				      		 <c:forEach var="carInstructionsModel" items="${carInstructionsModel.valueList}" varStatus="vs">
				 			        <tr class="tr_instructions">
							          <th> <input class="listNum" type="text" value="${carInstructionsModel.instructionsno}" id="instructionsno"  disabled onkeyup="if(event.keyCode !=37 && event.keyCode != 39){if (!/^[\d]+$/ig.test(this.value)){this.value='';}}"/> </th>
							          <td>
							              <input type="hidden" class="form-control" id="instructionsid" value="${carInstructionsModel.id}"/>
							              <textarea placeholder="请填写内容..."  id="content" disabled>${carInstructionsModel.content}</textarea>
							          </td>
							          <td><i class="fa fa-circle-o"></i></td>
							        </tr>
                              </c:forEach>
			 
					      </tbody>
					    </table>
					    <input id="trSelected" type="hidden" name="" value="0" />
				    </form>
	  			</div>
	  		</div><!-- co-content -->
  		</div>
  		
  	<!-- Modal -->
	<div class="modal fade" id="craftModal" tabindex="-1" role="dialog" aria-labelledby="craftModalLabel" data-backdrop="static">
	  <div class="modal-dialog" role="document">
	    <form action="front/carDesign/addInstrictionList"  method="post">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
		        <h4 class="modal-title">增加工序</h4>
		      </div>
		      
		      <div class="modal-body">
				  <div class="form-group">
				    <label>工序</label>
				    <input type="number" class="form-control" name="instructionsno" id="instructionsno" />
				    <input type="hidden" class="form-control" name="designid" id="designid" value="${carInstructionsModel.designid}"/>
				  </div>
				  <div class="form-group">
				    <label>工序内容</label>
				    <textarea class="form-control" placeholder="请填写内容..." cols="34" rows="5" name="content" id="content"></textarea>
				  </div>
		      </div>
		      
		      <div class="modal-footer">
		        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
		        <button type="submit" class="btn btn1">确定</button>
		      </div>
		    </div>
	     </form>
	  </div>
	</div>
  	
  	

    
  </body>
</html>
